get PopList("\one,two,three,\(-,\(disabled item,12345", myLeft,myTop,myLast)
put it into myLast
put "PopList choice was: "&mylast
end mouseDown
-- part contents for card part 5
----- text -----
PopList 1.0d2
Roger Brown
PopList is an XFCN that handles a pop-up menu. Menu items may contain Menu
Manager meta-characters. Normally, those characters are not processed, so you
can have menu items containing any text. If you want the meta-characters processed
for an item, put a back slash "\" in the first character position. For example, in the item list of "a,b,(c", the third item will be the literal string "(c". In the list "a,b,\(c", the third item will be a disabled "c" because the "\" character tells the XFCN to process the "(" as a meta-character.
Syntax is: get PopList(menuItems,left,top,default)
where menuItems is an item list of items. Ex. "Chicago,Helvetica,Times"
left and top are the left,top coordinates of the pop-up rectangle in local card
coordinates
default is an optional item number to indicate which item should be checked
when the menu is first popped up
returns the number of the item chosen or 0 if none was chosen.
REVISION HISTORY
1.0d2 10/15/89 First public release.
-- part contents for card part 8
----- text -----
/* PopList1.0d2.c */
/* © Digital Medicine Inc. 1989 */
/* written in THINK C © Think Technologies, Inc */
/* by Roger Brown 10/15/89 */
/* version 1.0d2: ignore blank items unless they start with \" */
/* version 1.0d1: to process meta-characters, precede a menu item with a
back slash "\" */
/* This is a HyperCard XFCN that handles popup menus.